<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>projsl</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>projsl</b> -  linear system projection</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[slp]=projsl(sl,Q,M)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>sl,slp</b>
        </tt>: <tt>
          <b>syslin</b>
        </tt> lists</li>
      <li>
        <tt>
          <b>Q,M</b>
        </tt>: matrices (projection factorization)</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>slp</b>
      </tt>= projected model of <tt>
        <b>sl</b>
      </tt> where <tt>
        <b>Q*M</b>
      </tt> is the full rank 
    factorization of the projection.</p>
    <p>
    If <tt>
        <b>(A,B,C,D)</b>
      </tt> is the representation of <tt>
        <b>sl</b>
      </tt>, the projected model
    is given by <tt>
        <b>(M*A*Q,M*B,C*Q,D)</b>
      </tt>.</p>
    <p>
    Usually, the projection <tt>
        <b>Q*M</b>
      </tt> is obtained as the spectral projection
    of an appropriate auxiliary matrix <tt>
        <b>W</b>
      </tt> e.g. <tt>
        <b>W</b>
      </tt> = product
    of (weighted) gramians or product of Riccati equations.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

rand('seed',0);sl=ssrand(2,2,5);[A,B,C,D]=abcd(sl);poles=spec(A)
[Q,M]=pbig(A,0,'c');  //keeping unstable poles
slred=projsl(sl,Q,M);spec(slred('A'))
sl('D')=rand(2,2);  //making proper system
trzeros(sl)  //zeros of sl
wi=inv(sl);  //wi=inverse in state-space
[q,m]=psmall(wi('A'),2,'d');  //keeping small zeros (poles of wi) i.e. abs(z)&lt;2
slred2=projsl(sl,q,m);
trzeros(slred2)  //zeros of slred2 = small zeros of sl
//  Example keeping second order modes
A=diag([-1,-2,-3]);
sl=syslin('c',A,rand(3,2),rand(2,3));[nk2,W]=hankelsv(sl)
[Q,M]=pbig(W,nk2(2)-%eps,'c');    //keeping 2 eigenvalues of W
slr=projsl(sl,Q,M);  //reduced model
hankelsv(slr)
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../linear/pbig.htm">
        <tt>
          <b>pbig</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>F. D.;   </p>
  </body>
</html>
